<select ng-model="encoding"
        ng-disabled="!controller.encodings.length"
        class="form-control">

    <!-- We cannot use ng-options here, since it does not set the selected attribute. -->
    <option ng-repeat="e in controller.encodings"
            ng-selected="e.value === encoding"
            value="{$ e.value $}">
      {$ e.value $}
    </option>

    <option ng-if="!controller.encodings.length"
            ng-selected="!controller.encodings.length"
            value="">
      No encodings available.
    </option>

</select>